package lx;

import java.util.ArrayList;
import java.util.Collections;

/*练习1：随机点名器
需求：班级里有N个学生，实现随机点名器
 */
public class demo1 {
    public static void main(String[] args) {
        //1.定义集合
        ArrayList<String> list = new ArrayList<String>();
        //2.添加数据
        Collections.addAll(list,"范闲","范建","范统","杜子腾","杜琦燕","宋合泛","侯笼藤","朱益群","朱穆朗玛峰");
        //3.随机打乱
        Collections.shuffle(list);
        System.out.println(list);
    }
}
